import request from '@/utils/request'
import type { CheckType} from '@/types/checkType'

// 获取所有检查类型
export const getAllCheckTypes = () => {
  return request<CheckType[]>({
    url: '/community/getCheckType',
    method: 'get'
  })
}

// 添加检查类型
export const addCheckType = (data: CheckType) => {
  return request<boolean>({
    url: '/community/addCheckType',
    method: 'post',
    data
  })
}

// 更新检查类型
export const updateCheckType = (data: CheckType) => {
  return request<boolean>({
    url: '/community/updateCheckType',
    method: 'post',
    data
  })
}

// 删除检查类型
export const deleteCheckType = (id: number) => {
  return request<boolean>({
    url: '/community/delCheckType',
    method: 'delete',
    params: { id }
  })
} 